package com.dong.listener_demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MyListener implements ApplicationListener<MyListenerEvent> {

    @Override
    public void onApplicationEvent(MyListenerEvent event) {
        log.info("接收到的事件信息:{}",event.getSource());
    }
}
